package com.basin.common.redisson.aop;


import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

import static com.basin.common.redisson.aop.LockType.REENTRANT_LOCK;

/**
 * @author: Sam ZHONG | sammy1997@aliyun.com
 */
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface BasinLock {

    String key();

    LockType type() default REENTRANT_LOCK;

    long waitTime() default 3000L;

    long limitTime() default 30000L;

    TimeUnit unit() default TimeUnit.MILLISECONDS;
}
